﻿#if UNITY_EDITOR
using UnityEditor;

namespace UFrame
{
    public class SpineAssetPostprocessor : AssetPostprocessor
    {
        public static string path = "";

        public static void OnPostprocessAllAssets(string[] importedAsset, string[] deletedAssets, string[] movedAssets,
            string[] movedFromAssetPaths)
        {
            //Debug.Log("OnPostprocessAllAssets");
            //foreach (string str in importedAsset)
            //{
            //    Debug.Log("importedAsset = " + str);
            //}
            //foreach (string str in deletedAssets)
            //{
            //    Debug.Log("deletedAssets = " + str);
            //}
            //foreach (string str in movedAssets)
            //{
            //    Debug.Log("movedAssets = " + str);
            //}
            //foreach (string str in movedFromAssetPaths)
            //{
            //    Debug.Log("movedFromAssetPaths = " + str);
            //}
        }

        void OnPreprocessAsset()
        {
            bool isSpine = assetImporter.assetPath.EndsWith(".atlas");
            if (isSpine)
            {
                //File.Copy(assetImporter.assetPath, assetImporter.assetPath + ".txt");
            }
        }
    }
}

#endif